package ai.people.core.grpc.lib.warning;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.42.0)",
    comments = "Source: warning/account.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class WarningAccountServiceGrpc {

  private WarningAccountServiceGrpc() {}

  public static final String SERVICE_NAME = "warning.WarningAccountService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest,
      ai.people.core.grpc.lib.key.account.KeyAccount> getAccountInfoMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "accountInfo",
      requestType = ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest.class,
      responseType = ai.people.core.grpc.lib.key.account.KeyAccount.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest,
      ai.people.core.grpc.lib.key.account.KeyAccount> getAccountInfoMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest, ai.people.core.grpc.lib.key.account.KeyAccount> getAccountInfoMethod;
    if ((getAccountInfoMethod = WarningAccountServiceGrpc.getAccountInfoMethod) == null) {
      synchronized (WarningAccountServiceGrpc.class) {
        if ((getAccountInfoMethod = WarningAccountServiceGrpc.getAccountInfoMethod) == null) {
          WarningAccountServiceGrpc.getAccountInfoMethod = getAccountInfoMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest, ai.people.core.grpc.lib.key.account.KeyAccount>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "accountInfo"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.key.account.KeyAccount.getDefaultInstance()))
              .setSchemaDescriptor(new WarningAccountServiceMethodDescriptorSupplier("accountInfo"))
              .build();
        }
      }
    }
    return getAccountInfoMethod;
  }

  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest,
      ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> getAccountJoinAnalysisListMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "accountJoinAnalysisList",
      requestType = ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest.class,
      responseType = ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest,
      ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> getAccountJoinAnalysisListMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest, ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> getAccountJoinAnalysisListMethod;
    if ((getAccountJoinAnalysisListMethod = WarningAccountServiceGrpc.getAccountJoinAnalysisListMethod) == null) {
      synchronized (WarningAccountServiceGrpc.class) {
        if ((getAccountJoinAnalysisListMethod = WarningAccountServiceGrpc.getAccountJoinAnalysisListMethod) == null) {
          WarningAccountServiceGrpc.getAccountJoinAnalysisListMethod = getAccountJoinAnalysisListMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest, ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "accountJoinAnalysisList"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse.getDefaultInstance()))
              .setSchemaDescriptor(new WarningAccountServiceMethodDescriptorSupplier("accountJoinAnalysisList"))
              .build();
        }
      }
    }
    return getAccountJoinAnalysisListMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static WarningAccountServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceStub>() {
        @java.lang.Override
        public WarningAccountServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningAccountServiceStub(channel, callOptions);
        }
      };
    return WarningAccountServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static WarningAccountServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceBlockingStub>() {
        @java.lang.Override
        public WarningAccountServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningAccountServiceBlockingStub(channel, callOptions);
        }
      };
    return WarningAccountServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static WarningAccountServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningAccountServiceFutureStub>() {
        @java.lang.Override
        public WarningAccountServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningAccountServiceFutureStub(channel, callOptions);
        }
      };
    return WarningAccountServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class WarningAccountServiceImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * 账号详情接口
     * </pre>
     */
    public void accountInfo(ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.key.account.KeyAccount> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAccountInfoMethod(), responseObserver);
    }

    /**
     * <pre>
     * 用户加入账号分析列表接口
     * </pre>
     */
    public void accountJoinAnalysisList(ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAccountJoinAnalysisListMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getAccountInfoMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest,
                ai.people.core.grpc.lib.key.account.KeyAccount>(
                  this, METHODID_ACCOUNT_INFO)))
          .addMethod(
            getAccountJoinAnalysisListMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest,
                ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse>(
                  this, METHODID_ACCOUNT_JOIN_ANALYSIS_LIST)))
          .build();
    }
  }

  /**
   */
  public static final class WarningAccountServiceStub extends io.grpc.stub.AbstractAsyncStub<WarningAccountServiceStub> {
    private WarningAccountServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningAccountServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningAccountServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     * 账号详情接口
     * </pre>
     */
    public void accountInfo(ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.key.account.KeyAccount> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getAccountInfoMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 用户加入账号分析列表接口
     * </pre>
     */
    public void accountJoinAnalysisList(ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getAccountJoinAnalysisListMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class WarningAccountServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<WarningAccountServiceBlockingStub> {
    private WarningAccountServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningAccountServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningAccountServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * 账号详情接口
     * </pre>
     */
    public ai.people.core.grpc.lib.key.account.KeyAccount accountInfo(ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getAccountInfoMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 用户加入账号分析列表接口
     * </pre>
     */
    public ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse accountJoinAnalysisList(ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getAccountJoinAnalysisListMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class WarningAccountServiceFutureStub extends io.grpc.stub.AbstractFutureStub<WarningAccountServiceFutureStub> {
    private WarningAccountServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningAccountServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningAccountServiceFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * 账号详情接口
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<ai.people.core.grpc.lib.key.account.KeyAccount> accountInfo(
        ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getAccountInfoMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 用户加入账号分析列表接口
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse> accountJoinAnalysisList(
        ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getAccountJoinAnalysisListMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_ACCOUNT_INFO = 0;
  private static final int METHODID_ACCOUNT_JOIN_ANALYSIS_LIST = 1;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final WarningAccountServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(WarningAccountServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_ACCOUNT_INFO:
          serviceImpl.accountInfo((ai.people.core.grpc.lib.warning.AccountInfoGrpcRequest) request,
              (io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.key.account.KeyAccount>) responseObserver);
          break;
        case METHODID_ACCOUNT_JOIN_ANALYSIS_LIST:
          serviceImpl.accountJoinAnalysisList((ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcRequest) request,
              (io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.warning.AccountAnalysisListGrpcResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class WarningAccountServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    WarningAccountServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return ai.people.core.grpc.lib.warning.Account.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("WarningAccountService");
    }
  }

  private static final class WarningAccountServiceFileDescriptorSupplier
      extends WarningAccountServiceBaseDescriptorSupplier {
    WarningAccountServiceFileDescriptorSupplier() {}
  }

  private static final class WarningAccountServiceMethodDescriptorSupplier
      extends WarningAccountServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    WarningAccountServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (WarningAccountServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new WarningAccountServiceFileDescriptorSupplier())
              .addMethod(getAccountInfoMethod())
              .addMethod(getAccountJoinAnalysisListMethod())
              .build();
        }
      }
    }
    return result;
  }
}
